/*-----------------顶部导航开始--------------*/

$(function(){
    setTimeout(function(){

        $("#allMask").fadeOut(500,function(){
            $("#contents").fadeIn(1000);
        });

    },9000);

});
window.onload= function(){
    $lis = $(".basicShow > li");
    for(var i = 0; i < $lis.length; i++){
        var li = $lis[i];
        li.onclick = function(){
            for(var j = 0; j < $lis.length; j++){
                var lsJ = $lis[j];
                $(lsJ).removeClass("current");
            }
            $(this).addClass("current");
        }
    }
    /*页面导航结束*/

    /*-----------------------项目内容开始-------*/
    $projectDetails = $("#project_details > div");
    for(var i = 0; i < $projectDetails.length; i++){
        $projectDetail = $projectDetails[i];
        var h4 = $projectDetail.querySelector("h4");
        h4.onclick = function(){
            $(this).parent("div").children("ul").toggle(1000);
        };
    }


    /*-----------------------项目内容结束-------*/


    /*----------音乐播放开始-------------*/

//将初始播放音量设置为0.5
//    $("#bgAudio")[0].volume = 1;

    /*----------音乐播放结束--------------*/
    $(".logout").on("click",function(){

        location.href = './login.html';
        sessionStorage.username = '';
        sessionStorage.password = '';
        sessionStorage.img = '';
        sessionStorage.userId = '';

    });

}